#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QVector>
#include <QListWidgetItem>

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void showMusic();
    void movie(int);
    int line,length;
    bool isNoSound = false;

    QString musicFileName = "music";
    QVector<int> indexLine;
    QVector<int> indexLength;
    int nowIndex = 0;
    QVector<int> lastIndex;
    int returnPlay = 0;
    QAction *addMusicList;
    QAction *deleteMusicList;
    QAction *deleteForMusicList;
    bool isbig = false;
    bool isFlag = false;
    QSize minsize;
    QSize maxsize;

    int map;

private slots:

    void on_listWidget_itemDoubleClicked(QListWidgetItem *item);
    void SetLyric(qint64);
    void SetCover();
    void StartDo();
    void on_musicList_itemClicked(QListWidgetItem *item);
    void on_listWidget_customContextMenuRequested(const QPoint &pos);
    void on_musicList_customContextMenuRequested(const QPoint &pos);
    void setMusicMessage(QString file);

    void lastPlay();
    void nextPlay();

    QString GetType(QString file);

    QString isDark(QString black,QString white);

signals:
    void itemClicked();

private:
    Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
